Mobile computing devices, such as mobile phones or head-mounted displays, provide users with robust technologies that are portable and capable of performing a variety of tasks. Such devices, despite their small profile, include hardware components that each perform a specialized function, just like a standard desktop PC. Also like the standard desktop PC, mobile devices rely on a traditional computing infrastructure, that includes at least an application layer, an operating system layer, and a hardware layer. Each of these layers facilitate the translation of operations received by a user into operations performed by one or more hardware components. For instance, a user initiating a phone call by hitting a “dial” button can be submitted via an application running on the operating system. The operating system can then communicate with the hardware layer, which in turn facilitates the translation of the received instruction to initiate the phone call by activating a microphone, a speaker, and a radio, among other things.
The traditional mobile device and its included hardware components can be fairly limited in functionality based on restraints placed by device and component manufacturers. More specifically, mobile devices are typically configured to focus on running one application at a time. While in some aspects, multiple applications can be concurrently executed on a mobile device, and multiple operations can be concurrently executed by these applications, the capability of concurrently communicating or accessing various hardware components is generally limited by the operating system or other drivers for communicating with the components. By way of example, when a user is recording audio on their mobile device, for instance, running a voice recording application, the user will be prohibited from recording at least the audio portion of a video, because the microphone is, in essence, locked by the voice recording application. While some mobile devices may opt for multiple microphones to overcome this limitation, some devices, such as a head-mounted display, may have a microphone placed in an ideal position (e.g., on a boom). When dealing with such a configuration (e.g., utilizing a microphone for audio input), an application could essentially lock access to the audio input component or resource when being utilized by a process of the application, thereby limiting access to other application processes that may require use of the audio input component or resource, such as a voice-control interface.
Embodiments of the present invention relate to, among other things, techniques for facilitating multi-process access to a single-process resource. In particular, embodiments of the present invention are generally directed toward systems, methods, and computer storage media for providing an improved component resource stack, such as an audio stack, to enable multiple applications or processes thereof to access a component that is configured to limit access to a single application or process thereof.
By receiving a request from a first application process to access an input resource (e.g., microphone input), the first application process can employ a resource stack in accordance with the herein described embodiments that can establish a connection between the first application process and the input resource without limiting access to other application processes. The resource stack, upon receiving the request, can establish access to the input resource, and instantiate a cache memory to store one or more portions of the input data received from the input resource. Further, the resource stack can generate a session between the first process and the instantiated cache memory, thereby providing a false indication to the first application process that typical access to the input resource has been established. That is, because the first application process expects exclusive access to the input resource, the resource stack generates a session that establishes the expected connection to the input resource, while enabling other application processes to also request and establish connections thereto. When a second request to access the input resource is received from a second application process, the resource stack can generate another session between the second application process and the instantiated cache memory, again providing a false indication to the second application process that typical access to the input resource has been established. As each application process is, in essence, connected to the instantiated cache memory of the input resource, each application process can receive, via their respective generated sessions, input data written into the instantiated cache memory of the input resource.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.